package cn.vcjf.weapp.api.user.entity;

import cn.vcjf.weapp.common.web.PageModel;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * <p>
    * 
    * </p>
 *
 * @author zhengzihang
 * @since 2018-09-25
 */
@TableName("vc_shopping_car")
public class ShoppingCar extends PageModel<ShoppingCar> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @NotNull(message = "userId不能为空")
    private Integer userId;

    /**
     * 商品规格ID
     */
    @NotNull(message = "groupId不能为空")
    private Integer groupId;

    /**
     * 商品数量
     */
    @NotNull(message = "goodsNo不能为空")
    private Integer goodsNo;

    /**
     * 商品ID
     */
    @NotNull(message = "goodsId不能为空")
    private Integer goodsId;
/*****************************************************/

    /**
     * 商品价格
     */
    @TableField(exist = false)
    private BigDecimal goodsPrice;

    /**
     * 商品名称
     */
    @TableField(exist = false)
    private String goodsName;
    /**
     * 组合属性名称
     */
    @TableField(exist = false)
    private String proIdName;

    /**
     * 商品预览图片
     */
    @TableField(exist = false)
    private String goodsFilesId;

    /**
     * 商品描述
     */
    @TableField(exist = false)
    private String goodsDes;

    /**
     * 以逗号隔开的商品标签
     */
    @TableField(exist = false)
    private String goodsLabel;

    public String getProIdName() {
        return proIdName;
    }

    public void setProIdName(String proIdName) {
        this.proIdName = proIdName;
    }

    public Integer getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(Integer goodsId) {
        this.goodsId = goodsId;
    }

    public BigDecimal getGoodsPrice() {
        return goodsPrice;
    }

    public void setGoodsPrice(BigDecimal goodsPrice) {
        this.goodsPrice = goodsPrice;
    }


    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public String getGoodsFilesId() {
        return goodsFilesId;
    }

    public void setGoodsFilesId(String goodsFilesId) {
        this.goodsFilesId = goodsFilesId;
    }

    public String getGoodsDes() {
        return goodsDes;
    }

    public void setGoodsDes(String goodsDes) {
        this.goodsDes = goodsDes;
    }

    public String getGoodsLabel() {
        return goodsLabel;
    }

    public void setGoodsLabel(String goodsLabel) {
        this.goodsLabel = goodsLabel;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }
    public Integer getGroupId() {
        return groupId;
    }

    public void setGroupId(Integer groupId) {
        this.groupId = groupId;
    }
    public Integer getGoodsNo() {
        return goodsNo;
    }

    public void setGoodsNo(Integer goodsNo) {
        this.goodsNo = goodsNo;
    }

    @Override
    public void preInsert(){
        super.preInsert();
    }
    @Override
    public void preUpdate(){
        super.preInsert();
    }
    @Override
    public String toString() {
        return "ShoppingCar{" +
        "id=" + id +
        ", userId=" + userId +
        ", groupId=" + groupId +
        ", goodsNo=" + goodsNo +
        ", createUser=" + createUser +
        ", createTime=" + createTime +
        ", updateUser=" + updateUser +
        ", updateTime=" + updateTime +
        ", deleteFlag=" + deleteFlag +
        ", sysUserId=" + sysUserId +
        "}";
    }
}
